﻿/// <reference path="~/Scripts/jquery-vsdoc-cn.js" />
var objID = "a";
var IsShow = true;
function ShowNav() {
    if (!IsShow) {
        top.fstMain.cols = "269,*";
        IsShow = true;
        ShowNavSpan.innerHTML = "隐藏导航栏";
    }
    else {
        top.fstMain.cols = "0,*";
        IsShow = false;
        ShowNavSpan.innerHTML = "显示导航栏";
    }
}

function outpic(picPath) {
    /// <summary>
    ///  显示产品缩略图
    /// </summary>
    overlib("<img src='" + picPath + "' width='200'>", CAPTION, "", FGCOLOR, '#fcfcfc', BGCOLOR, '#0080C0', CAPCOLOR, '#ffffff', BORDER, 1, CLOSETEXT, 'Close');
}

$(function () {
    $(".tablelist tr:nth-child(even)").addClass("forumRow");
});

$(function () {
    //$(".rowlist tr:nth-child(odd)").addClass("forumRowLine");
    $(".overlist tr:not(:eq(0))").mouseover(function () {
        $(this).addClass("over");
    }).mouseout(function () {
        $(this).removeClass("over");
    });
    $(".header").addClass("headertext");

    $(".tableheader tr:first-child > td").addClass("header");
    $(".tableheader tr:first-child > th").addClass("header");
});
//全选 反选
function SelectAll(tempControl) {
    var ball = tempControl;
    xState = ball.checked;
    elem = ball.form.elements;
    for (i = 0; i < elem.length; i++) {
        if (elem[i].type == "checkbox" && elem[i].id != ball.id) {
            if (elem[i].checked != xState) {
                elem[i].click();
            }
        }
    }
}
var FunCallBack;

function UploadCallBack(filePath) {
    ///<summary>
    ///上传回调函数
    ///</summary>
    FunCallBack(filePath);
}
function openUploadWindow(options, callback) {
    ///<summary>
    ///打开上传窗口
    ///</summary>
    var p = {
        height: 540,
        width: 800,
        path: ""
    };

    FunCallBack = callback;
    p = $.extend(p, options);
    var $dialog = $("<div class='jquery-dialog'></div>");
    $dialog.dialog({
        height: p.height,
        width: p.width,
        modal: true,
        resizable: false,
        iframe: true,
        title: "文件选择",
        open: function (a, b) {
            $(this).html("<iframe id='center' src='/admin/Upload/Admin_UploadSelect.aspx' scrolling='auto' frameborder='0' width='100%' height='100%'></iframe>");
        }
    });
}

function OpenUpload() {
    openUploadWindow({}, function (a) {
        return a;
    });
    return "";
}

function showDateTime() {
    //dateFmt:'yyyy-MM-dd HH:mm:ss'
    WdatePicker({
        isShowClear: false,
        readOnly: true,
        dateFmt: 'yyyy/MM/dd HH:mm:ss'
    });
}
function selectedAll($this) {
    if ($($this).attr("checked") == true) {
        $(".checkitem").find("input").attr("checked", true);
        $(".checkitem").attr("checked", true);
    } else {
        $(".checkitem").find("input").attr("checked", false);
        $(".checkitem").attr("checked", false);
    }
}